#ifndef BROADCASTKEY_H
#define BROADCASTKEY_H

#include <QObject>
#include <QTimer>
#include <QUdpSocket>
class BroadcastKey : public QObject
{
    Q_OBJECT
public:
    explicit BroadcastKey(QObject *parent = 0);

signals:
    void reportedMessage(const QString &message);
public slots:
    void startBroadcasting();
    void updateAddresses();
    void sendBroadcastDatagram();
    QByteArray readFile();
private:
    QList<QHostAddress> broadcastAddresses;
    QUdpSocket broadcastSocket;
    QTimer broadcastTimer;
};

#endif // BROADCASTKEY_H
